home *** CD-ROM | disk | FTP | other *** search
/ 64'er Special 4 / 64er_Magazin_Sonderheft_04_86-04_1986_Markt__Technik_de_Disk_1_of_2_Side_A.d64 / listing 03.p (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  635b  |  21 lines

  1. 10 dim m%(26)
  2. 51000 rem befehlszerlegung-codierung -------------------------------------------
  3. 51001 :
  4. 51010 vg$="nimm":vg=1012
  5. 51020 rem m$-tabelle anlegen ---------
  6. 51040 fori=1to26:m%(i)=len(vg$):nexti
  7. 51050 fori=1tolen(vg$):m%(asc(mid$(vg$,i,1))-64)=len(vg$)-i:nexti
  8. 51052 fori=1tolen(vg$):printmid$(vg$,i,1),m%(asc(mid$(vg$,i,1))-64):nexti
  9. 51060 rem vg$ in be$ suchen ----------
  10. 51065 print"[147] ";be$
  11. 51070 po=1
  12. 51080 fori=1topo:print" ";:nexti:printvg$
  13. 51085 ifvg$=mid$(be$,po,len(vg$))thenprint"gefunden !":end
  14. 51090 fori=len(vg$)to1step-1
  15. 51095 :ifmid$(be$,po+i,1)=""thenprint"nicht gefunden!":end
  16. 51105 :ifmid$(vg$,i,1)=mid$(be$,po+i-1,1)then51120
  17. 51109 :ifasc(mid$(be$,po+i-1,1))=32thenpo=po+len(vg$):i=0:goto51120
  18. 51110 :po=po+m%(asc(mid$(be$,po+i-1,1))-64)+len(vg$)-i:i=0
  19. 51120 nexti
  20. 51130 goto51080
  21.